#include "cmath.h"
#include <cmath>
const double MMIN=1e-6;
const double MMAX=1e6;

using namespace std;
using namespace RayTrace;

CMath::CMath(void)
{
}

CMath::~CMath(void)
{
}

bool RayTrace::CMath::LinearEquation( float A,float B,float C,float D,float E,float F,float &x1,float& x2 )
{
	float t=A*D-B*C;
	if (fabs(t)<MMIN)
	{	
		return false;//no solution
	}
	else
	{
		x1=(D*E-B*F)/t;
		x2=(-C*E+A*F)/t;
		return true;
	}

}